package com.ruoyi.procurementmanagement.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.procurementmanagement.mapper.ErpWarehouseEntryProductMapper;
import com.ruoyi.procurementmanagement.domain.ErpWarehouseEntryProduct;
import com.ruoyi.procurementmanagement.service.IErpWarehouseEntryProductService;

/**
 * 入库单商品明细Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-06-09
 */
@Service
public class ErpWarehouseEntryProductServiceImpl implements IErpWarehouseEntryProductService 
{
    @Autowired
    private ErpWarehouseEntryProductMapper erpWarehouseEntryProductMapper;

    /**
     * 查询入库单商品明细
     * 
     * @param id 入库单商品明细主键
     * @return 入库单商品明细
     */
    @Override
    public ErpWarehouseEntryProduct selectErpWarehouseEntryProductById(Long id)
    {
        return erpWarehouseEntryProductMapper.selectErpWarehouseEntryProductById(id);
    }

    /**
     * 查询入库单商品明细列表
     * 
     * @param erpWarehouseEntryProduct 入库单商品明细
     * @return 入库单商品明细
     */
    @Override
    public List<ErpWarehouseEntryProduct> selectErpWarehouseEntryProductList(ErpWarehouseEntryProduct erpWarehouseEntryProduct)
    {
        return erpWarehouseEntryProductMapper.selectErpWarehouseEntryProductList(erpWarehouseEntryProduct);
    }

    /**
     * 新增入库单商品明细
     * 
     * @param erpWarehouseEntryProduct 入库单商品明细
     * @return 结果
     */
    @Override
    public int insertErpWarehouseEntryProduct(ErpWarehouseEntryProduct erpWarehouseEntryProduct)
    {
        return erpWarehouseEntryProductMapper.insertErpWarehouseEntryProduct(erpWarehouseEntryProduct);
    }

    /**
     * 修改入库单商品明细
     * 
     * @param erpWarehouseEntryProduct 入库单商品明细
     * @return 结果
     */
    @Override
    public int updateErpWarehouseEntryProduct(ErpWarehouseEntryProduct erpWarehouseEntryProduct)
    {
        return erpWarehouseEntryProductMapper.updateErpWarehouseEntryProduct(erpWarehouseEntryProduct);
    }

    /**
     * 批量删除入库单商品明细
     * 
     * @param ids 需要删除的入库单商品明细主键
     * @return 结果
     */
    @Override
    public int deleteErpWarehouseEntryProductByIds(Long[] ids)
    {
        return erpWarehouseEntryProductMapper.deleteErpWarehouseEntryProductByIds(ids);
    }

    /**
     * 删除入库单商品明细信息
     * 
     * @param id 入库单商品明细主键
     * @return 结果
     */
    @Override
    public int deleteErpWarehouseEntryProductById(Long id)
    {
        return erpWarehouseEntryProductMapper.deleteErpWarehouseEntryProductById(id);
    }
}
